<template>
	<view :class="[BackGround]" :style="[{'font-weight':Style,'font-family':Font,height:100 + '%',minHeight:height + 'px'}]">
		<cu-custom bgColor="bg-gradual-blue" isBack="true">
			<view slot="backText">返回</view>
			<view slot="content">OA办公</view>
		</cu-custom>
		<list-box ref="list" :list="list" @jumpview="jumpArchives" @zylongtap="zylongtap"></list-box>
		<chunLei-popups v-model="value1" :popData="data1" @tapPopup="tapPopup" @zyinput="zyinput" :x="x" :y="y" placement="top-end"></chunLei-popups>
	</view>
</template>

<script>
	import chunLeiPopups from "@/colorui/components/chunLei-popups/chunLei-popups"
	import ListBox from '@/colorui/components/list.vue'
	import {
		mapGetters
	} from 'vuex'
	import {
		Commonly,
	} from "@/mixin/mixin.js"
	export default {
		mixins:[Commonly],
		data() {
			return {
				height: this.screenHeight,
				list: [{
					img: "/static/images/Visitorrecord.png",
					url:"./OAmanage/Visitorrecord/Visitorrecord",
					name: '访客记录',
					LMENUID: '970902',
					isShow: true,
					id: 0
				}, {
					img: "/static/images/attendance.png",
					url:"./OAmanage/attendance/attendance",
					name: '考勤记录',
					LMENUID: '970902',
					isShow: true,
					id: 1
				}, {
					img: "/static/images/Giveanalarm.png",
					url:"./OAmanage/Giveanalarm/Giveanalarm",
					name: '告警记录',
					LMENUID: '970902',
					isShow: true,
					id: 2
				}, {
					img: "/static/images/signature.png",
					url:"./OAmanage/signature/signature",
					name: '考勤补签',
					LMENUID: '970902',
					isShow: true,
					id: 3
				}, {
					img: "/static/images/OAaa.png",
					url:"./OAmanage/OA/OA",
					name: '远程开门',
					LMENUID: '970902',
					isShow: true,
					id: 4
				}, {
					img: "/static/images/Jurisdiction.png",
					url:"./OAmanage/Jurisdiction/Jurisdiction",
					name: '条码授权',
					LMENUID: '970902',
					isShow: true,
					id: 5
				}, {
					img: "/static/images/businesstravel.png",
					url:"./OAmanage/businesstravel/businesstravel",
					name: '外勤打卡',
					LMENUID: '970902',
					isShow: true,
					id: 6
				}],
			}
		},
		computed: {
			...mapGetters([
				'Style', 'Font', 'BackGround', 'BackGroundBox'
			])
		},
		components: {
			ListBox,
			chunLeiPopups
		},
		onLoad() {
			// this.$http.req.defaultData.header.token = '561616165161561615'
			let tree = uni.getStorageSync('tree')
			// console.log(tree)
			for (let value of tree) {
				if (value.LFUNCNAME == 'OA办公') {
					for (let tt of value.children) {
						for (let uu of this.list) {
							if (uu.LMENUID == tt.LMENUID) {
								uu.isShow = true
							}
						}
					}
				}
			}
		},
		methods: {
			jumpArchives(item) {
				switch (item) {
					case 0:
						uni.navigateTo({
							url: './Visitorrecord/Visitorrecord'
						})
						break;
					case 1:
						uni.navigateTo({
							url: './attendance/attendance'
						})
						break;
					case 2:
						uni.navigateTo({
							url: './Giveanalarm/Giveanalarm'
						})
						break;
					case 3:
						uni.navigateTo({
							url: './signature/signature'
						})
						break;
					case 4:
						uni.navigateTo({
							url: './OA/OA'
						})
						break;
					case 5:
						uni.navigateTo({
							url: './Jurisdiction/Jurisdiction'
						})
						break;
					case 6:
						uni.navigateTo({
							url: './businesstravel/businesstravel'
						})
						break;

					default:
						break;
				}
			},
			
		}
	}
</script>

<style>

</style>
